/**
 * Copyright 2012 Alfredo "Rainbowbreeze" Morresi
 * 
 * This file is part of Eureka! project.
 * 
 * Eureka! is free software: you can redistribute it and/or modify it under the
 * terms of the GNU General Public License as published by the Free Software
 * Foundation, either version 3 of the License, or (at your option) any later
 * version.
 * 
 * Eureka! is distributed in the hope that it will be useful, but WITHOUT ANY
 * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
 * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
 * details.
 * 
 * You should have received a copy of the GNU General Public License along
 * with Eureka!. If not, see http://www.gnu.org/licenses/.
 */
package it.rainbowbreeze.eureka.data;

import android.content.ContentResolver;
import android.content.ContentUris;
import android.net.Uri;
import android.test.ProviderTestCase2;

/**
 * @author Alfredo "Rainbowbreeze" Morresi
 *
 */
public class EurekaProviderTest extends ProviderTestCase2<EurekaProvider> {

    // ------------------------------------------ Private Fields

    // -------------------------------------------- Constructors
    public EurekaProviderTest() {
        super(EurekaProvider.class, EurekaContract.AUTHORITY);
    }

    // --------------------------------------------------- Tests
    public void testGetType() {
        String type;
        Uri uri;
        ContentResolver cr = getMockContentResolver();
        
        //Pots
        uri = EurekaContract.QualityPoint.CONTENT_URI;
        type = cr.getType(uri);
        assertEquals("Wrong content type", EurekaContract.QualityPoint.CONTENT_TYPE, type);
        uri = ContentUris.withAppendedId(uri, 100);
        type = cr.getType(uri);
        assertEquals("Wrong content type", EurekaContract.QualityPoint.CONTENT_TYPE_ITEM, type);
    }

    // ----------------------------------------- Private Methods

    // ----------------------------------------- Private Classes
}
